{{template "Public/header.html" .}}

<link rel="stylesheet" type="text/css" href="/public/css/calendar/jscal2.css"/>
<link rel="stylesheet" type="text/css" href="/public/css/calendar/border-radius.css"/>
<link rel="stylesheet" type="text/css" href="/public/css/calendar/calendar-blue.css"/>
<script type="text/javascript" src="/public/js/calendar/calendar.js"></script>
<script type="text/javascript" src="/public/js/calendar/lang/en.js"></script>
<script type="text/javascript" src="/public/js/lib/jquery.cookie.js"></script>
<script type="text/javascript" src="/public/js/lib/jquery.imagePreview.js"></script>
<script type="text/javascript" src="/public/js/Content/list.js"></script>

<SCRIPT>
if (window.top.$("#current_pos").data('clicknum') == 1
		|| window.top.$("#current_pos").data('clicknum') == null) {
	parent.document.getElementById('display_center_id').style.display = '';
	parent.document.getElementById('center_frame').src = '/Content/left/';
	window.top.$("#current_pos").data('clicknum', 0);
}

	//搜索
function Search() {
	url = '/Content/list/{{.cid}}/';
	
	search += 'posids:' + $('#posids').val() + '/';
	search += 'searchtype:' + $('#searchtype').val() + '/';
	search += 'keyword:' + $('#keyword').val() + '/';
	search += 'start_time:' + $('#start_time').val() + '/';
	search += 'end_time:' + $('#end_time').val() + '/';

	$.base64.encode(search)

	url += $.base64.encode(search)+'/1/';

	redirect(url);
};
</SCRIPT>
<body>
	<div id="closeParentTime" style="display: none"></div>
	<div class="subnav">
		<div class="content-menu ib-a blue line-x">
			<a href='javascript:;' class="on"><em>内容管理</em></a><span>|</span><a
				href='/Content/add/{{.cid}}/'><em>添加内容</em></a>
		</div>
	</div>
	<div class="pad-10">
		<div id="searchid">
		<form name="searchform" action="/content/list/search/"
			method="post">
			<input type="hidden" value="{{.cid}}" name="cid">
			<table width="100%" cellspacing="0" class="search-form">
				<tbody>
					<tr>
						<td>
							<div class="explain-col">
								添加时间： <input type="text" name="start_time" id="start_time"
									value="" size="10" class="date" readonly>&nbsp; -
								&nbsp;<input type="text" name="end_time" id="end_time" value=""
									size="10" class="date" readonly>&nbsp; <select
									name="posids" id="posids"><option value='' selected>全部</option>
									<option value="0">不置顶</option>
									<option value="1">置顶</option>
								</select> <select name="searchtype" id="searchtype">
									<option value='1' selected>标题</option>
									<option value='2'>简介</option>
									<option value='3'>用户名</option>
									<option value='4'>ID</option>
								</select> <input name="keyword" id="keyword" type="text" value=""
									class="input-text" /> <input type="button" name="dosearch"
									class="button" onclick="Search()" value="搜索" />
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</form>
		</div>
		<div id="content_list">
			<form name="myform" id="myform" action="" method="post">
				<input type="hidden" value="{{.cid}}" name="cid">
				<div class="table-list">
					<table width="100%">
						<thead>
							<tr>
								<th width="16"><input type="checkbox" value=""
									id="check_box" onclick="selectall('ids[]');"></th>
								<th width="40">ID</th>
								<th>标题</th>
								<th width="40">点击量</th>
								<th width="70">发布人</th>
								<th width="118">更新时间</th>
								<th width="72">管理操作</th>
							</tr>
						</thead>
						<tbody>
						{{if .article_list}}
						{{range .article_list}}
						<tr>
							<td align="center">
							<input type="checkbox" value="{{.Id}}" name="ids[]" class="inputcheckbox ">
							</td>
							<td align="center">1</td>
							<td>
								<a target="_blank" href="">
									<span style="color:{{.Color}};font-weight:{{.Font}};">
										{{.Title}}
									</span>
								</a> 
							</td>
							<td align="center" title="">{{.Hits}}</td>
							<td align="center">{{.Admin.Username}}</td>
							<td align="center">{{.Createtime}}</td>
							<td align="center">
								<a href="/Content/edit/{{.Cid}}/{{.Id}}/">修改</a> | 
								<a href="">评论</a>
							</td>
						</tr>
						{{end}}
						{{end}}
						</tbody>
					</table>
					<div class="btn">
						<input type="button" class="button" value="删除"
						onclick="myform.action='/Content/delete/{{.cid}}/';return confirm_delete()" />
						<input type="button" class="button" value="推送" onclick="push();" />
						<input type="button" class="button" value="批量移动"
							onclick="remove();" />
					</div>
					<div id="pages">
						{{.pages}}
					</div>
				</div>
			</form>
		</div>
	</div>
</body>

{{template "Public/footer.html" .}}